<template>

	<view class="nav start border-bottom-1B202C" style="border-color: #EE515A;">
		<view class="back flex-sub">
			<image @click="gotoback" class="goback" src="/static/imgs/about_slices/5.png"></image>
		</view>
		<view class="flex-f1 tx-c flx flx-col">
			<view class="title">{{name}}</view>
			<view class="num" style="margin-top: 4rpx;">{{code}}</view>
		</view>
		<view class="flex-sub">
			<!-- <image class="search" v-if="right" src='../static/images/icon/add_white.png' mode="widthFix" style="width: 40rpx;"></image> -->
		</view>
	</view>

</template>

<script>
	export default {
		props: {
			name:{
				type:String,
				default:'上证指数'
			},
			code:{
				type:String,
				default:'000001'
			},
			right:{
				type:Boolean,
				default:true
			}
		},
		data() {
			return {
				placeholder: '请输入股票代码/名称',
				value: 0,
			};
		},

		methods: {
			add() {
				this.value += 1
			},
			del() {
				this.value -= 1
			},
			// 返回
			gotoback() {
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.nav {
		height: 44px;
		background-color: #EE515A;
		padding-right: 15px;

	}

	.goback {
		width: 40rpx;
		height: 40rpx;
	}

	.back {

		padding: 10px 11px;
		font-size: 12px;
		color: #ffffff;
	}

	.search {
		width: 18px;
		height: 18px;
	}

	.title {

		font-size: 18px;
		font-family: PingFang SC;
		font-weight: bold;
		color: #FFFFFF;

	}

	.num {

		font-size: 12px;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FFFFFF;

	}
</style>
